package com.riku.security.common;

import java.util.HashMap;
import java.util.Map;

/**
 * 权限判断数据已存在异常
 */
public class SeSecurityException extends RuntimeException {
    private String message;

    private static Map<String,String> errorMap;

    public static final String ERROR_EXSIT = "1";

    static {
        errorMap = new HashMap<>();
        errorMap.put(ERROR_EXSIT,"数据已存在");
    }

    public SeSecurityException(String code){
        message = errorMap.get(code);
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
